﻿// Copyright (c)  MOKEYISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

namespace NSQL.Expressions.Functions
{
    public class CastFunction : BaseExpression, ICastFunction
    {
        public IValueExpression Expr { get; }
        public string TargetType { get; }

        public CastFunction(IValueExpression expr, string targetType)
        {
            Expr = expr;
            TargetType = targetType;
        }
        
        public override T Accept<T>(IExpressionVisitor<T> visitor) => visitor.Visit(this);
    }
}